#include<iostream>
using namespace std;
int main()
{
	unsigned long long sum;
	int x, n;
	cin >> x >> n;
	int count = 0;
	for (int i = x; i <= n; i++) {
		if (i % 6 == 0 || i % 7 == 0) {
			count++;
		}
	}
	sum = 250 * (n - count);
	cout << sum << endl;	
	return 0;
}